#pragma once

#include "cocos2d.h"
#include "HpBar.h"
#include "Creature.h"

using namespace cocos2d;


class Tooth : public Creature
{
public:
	typedef enum {
		STATE_INIT,
		STATE_STANDBY,
		STATE_SHOOT,
		STATE_DEAD,
		NUM_OF_STATE,
	} EState;

	Tooth(void);
	~Tooth(void);
	CREATURE_CREATE_FUNC(Tooth); 
	
	virtual bool init(); 
	void onUpdrade();

protected:
	float d_animInterval;
	float d_hpRecoveryRate;
	int d_baseHP;

	virtual CCAction* getHangAction() {return NULL;}
	virtual void shoot();
	void onDead();
	float onHit(float damage);


private:
	void standbyAnim(float dt);

	EState d_state;
};

